<div class="fm-content">
  <!-- 最上面标题栏 -->
  <div class="title">
    <i nz-icon [type]="'desktop'"></i>
    &nbsp;&nbsp;在线用户
  </div>
  <!-- 内容 -->
  <div class="work">

    <div class="top">
      <div class="tool-right">
        <nz-button-group>
          <button nz-button [nzType]="'primary'" (click)="fs.resetQueryObject() && fs.loadData(true)">刷新</button>
        </nz-button-group>
      </div>
    </div>

    <!-- 右则样表单主体 -->
    <div class="work-content">
      <div class="table">
        <nz-table nzSize="middle" nzShowSizeChanger [nzPageSizeOptions]='[ 10, 15, 20, 30, 40, 50 ]'
          [nzFrontPagination]="false" [nzData]="fs.datas" [nzLoading]="fs.isLoading || fs.isDeleing"
          [nzTotal]="fs.rowsCount" [(nzPageIndex)]="fs.pageIndex" [(nzPageSize)]="fs.pageSize"
          (nzPageIndexChange)="fs.loadData()" (nzPageSizeChange)="fs.loadData(true)">
          <thead (nzSortChange)="fs.sort($event)" nzSingleSort>
            <tr>
              <th nzWidth="30%">用户</th>
              <th nzWidth="30%">时间</th>
              <th nzWidth="15%">访问</th>
            </tr>
          </thead>
          <tbody>
            <tr *ngFor="let data of fs.datas">
              <td>
                {{data.userInfo.userName}}<br />
                {{data.userInfo.userDepName}}
              </td>
              <td>
                登录:{{data.creationTime | date:'yyyy-MM-dd HH:mm:ss'}}<br />
                更新:{{data.lastVisitTime | date:'yyyy-MM-dd HH:mm:ss'}}
              </td>
              <td>
                {{data.countOfUses}}次
              </td>
            </tr>
          </tbody>
        </nz-table>
      </div>
    </div>
  </div>
</div>
